{% import 'languages/'+lang|default('en')+'.html' as lang %}
<div class="out left-space">
	<div class="diff">
		{% set plus = [] %}
		{% set minus = [] %}
		{% set total_change = 0 %}
		{% for line in stdout -%}
			{%- if loop.index0 == 0 -%}
				<div class="diffHead">{{ line }}<br />
			{%- elif loop.index0 == 1 %}
				{{ line }}</div>
			{% elif line.startswith('-') and loop.index0 > 1 %}
				<div class="lineDiffMinus">{{ line }}</div>
				{% do minus.append(1) %}
			{% elif line.startswith('+') and loop.index0 > 2 %}
				<div class="lineDiffPlus">{{ line }}</div>
				{% do plus.append(1) %}
			{% elif line.startswith('@') %}
				<div class="lineDog">{{ line }}</div>
			{% else %}
				<div class="lineDiff">{{ line }}</div>
			{%- endif %}
		{% endfor %}

		{% set total_change = minus + plus %}
		<div class="diffHead">
			{{lang.words.total|title()}} {{lang.words.changes}}: {{ total_change|length }}, {{lang.words.additions}}: {{ plus|length }} & {{lang.words.deletions}}: {{ minus|length }}
		</div>
	</div>
</div>
